package com.wind.taobao.api.trade.trade.rest
{
	import com.wind.taobao.api.IPrivateAPI;
	import com.wind.taobao.core.exception.InvalidRequestParametersException;
	import com.wind.taobao.core.util.TaobaoUtils;
	import com.wind.taobao.core.webservice.TaobaoRequest;

	/**
	 * taobao.trade.memo.add Request
	 * @author fxy
	 *
	 */
	public class TradeMemoAddRequest extends TaobaoRequest implements IPrivateAPI
	{
		public override function get method():String
		{
			return "taobao.trade.memo.add"
		}
		/**
		 * Y 	 交易备注。最大长度: 1000个字节
		 */
		[Bindable]
		public var memo:String;
		/**
		 * Y 	交易ID
		 */
		[Bindable]
		public var tid:String;

		public override function validate():void
		{
			if (!TaobaoUtils.hasAllValue([memo, tid]))
			{
				throw new InvalidRequestParametersException("请求参数[memo,tid]不能为空");
			}
			if (memo.length > 1000)
			{
				throw new InvalidRequestParametersException("请求参数[memo]长度不能大于1000");
			}
		}
	}
}